package com.personal.server.impl;

import com.personal.mapper.PersonalDataMapper;
import com.personal.pojo.PersonalData;
import com.personal.server.PersonalDateServer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class PersonalDataServerImpl implements PersonalDateServer {

    @Autowired
    private PersonalDataMapper personalDataMapper;

    @Override
    public PersonalData getPersonalDataById(int id) {
        PersonalData p = personalDataMapper.getPersonalDataById(id);
        if (p == null) {
            log.info("查询失败");
            return null;
        }
        log.info("查询成功：{}",p);
        return p;
    }
}
